const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}

const user = {
  "yangpeng.zhang": {
    name: "KEZhFT7c5zdcS8BN6C2raJ6rGzqZOog0BnMwytgZkqTuUB4rGBhyNnajc3Po3tITM4kOFpxz9LgIWB3lTAw0R9AZ54VVyntVLJz/Wl0EPtERFt+nIgMSEaoI7pHMzH1bxG12SX24vgEMICJAIAWjyticHc3lv+zib0jOkE6cAoMq5XqCMyio0R2+d7h8oLHBUhkpgFZ/3bdQtU6lrMD8dsMZPtG2KtIgm9ZpCaoSA2IqnKtX171j5Zv+emRf+g+H9BbOA9dFueWPQbXq861VhEyaAH+dqcHKghiCtMLSRXL0qfZ9snYyzN+yhwLcci+zs1d/3baSuJlUZ4fycCZTxQ==",
    password: "p+2RRgL9xBwHuFjRQ7Zqxq1iR+KyFOZL0NVCcKMnqtvmLAXCfqgNHLumTVQpPE62t52CZIg6fea98cZg/D/58HmABZuUMw/C4s0cnvA/NayvERe1yzWK3oNf6WtifjPKD3WmdxI0cJCLQ19irB1micztIUX3pC15mUnDlwaW+vDf0n1Zy7zXWzmoFTauu2QiZezWSPz4xftJyJ2MdJcfCqko9itTZXbSuh46A0rzg//Ovx8kY0jb2s/yqbx6sVOy9touqgqKHRx4nRXcFtEzfjxdWrpUlVetqDJKXuaAgQgn65UbBZgv2l9X5ywcXawSz+I1XHUIC6g/uKTOjej42A=="
  },
  "fangyuan.shi": {
    name: "kfN716SQQrkb4N2isdqTp2YC378QuAgtVtV5YXn1aXSiOpBfD8ZATb2CpxdXX8HeU7B3+Okm295rWmTqL/VlesPw46w9Svz3a3w/7pz50jX2MWfrDDXSPMrp61Vdn92r6k+lkHEEOI+OhhXjHAIDXIZVL4Ixxb77mj2qkHc4sElsJfpqxcCs/qYUhsCYVhO8zqwkKtMfgrAmf1D15vt+dD3Hf7kHChJtUBZ3F8HNJ8I2okhY4blWYlkgtqRozp92kr2hL0XJbIvj+0G0d7dr6n1BqzGKGFY85O3npYVjpMIg+tXxvYO+gZSU7lRZmGdhGvGsgGH3CyrGF4le2qfQ/g==",
    password: "GPLnhUoc9RzU+AqsiICpSd1Y6zyoxM9fEZY+K2UIRfFjF7NG7nHRkdD00QVrpqtb7hvBHAuYH/UFMaZeK8O15hzhaPEt7v30787yMW5hIvhkOUJ15eC+LhRP3591s9zRYszwTwGrmOQ/8QZXaDA75v+AK6w0QRj3jJsqD1tvR8ghIbUFoXvKPrkdqwSdkJ6+QMbzCMkhJWS2YnPNAf3Yy011cxXMTd8Ph2R+KrgGHD5LK4SHy2XLHUiMLteDe/Hq2gg98u+XruBAUn5qEcJvjyLV9yWgrRY7tGeX/Vcv+h5uY+FQbdn8dIgsWNd7So64icAT6mU31eC4BC40OUsApw=="
  }
}

const unikey = {
  "yangpeng.zhang": "a0b30b173d60a927373447e2dc8d1390",
  "yingchun.li": "182042008af112fe5b451b950d261c7f",
  "qiang.tan": "86f8187f5f177a0a0196e4ca7a2ba251",
  "jie.li": "d2cfc84a59b80532b53bec7e3e19e00a",
  "wentao.zhang2": "d882a7c30b866dbb460c07cfc027635e",
  "yang.luan": "fac93e977ee9518bb7eda053fa51b7de",
  "fangyuan.shi": "f70fb1974a64f08964c56a85af7b8175",
  "luyao.xu": "8691083f3b86c86ae4ab2d2578dc4c8b",
  "ning.shu2": "7bd49f81458ac592a7093f3dba7d99cb",
  "yadi.wang": "8a4ad29a47b9fa55cb99816787aa383e",
  "wei.gao": "16269aaaa6e4625b8dc295a673f79e25",
  "haorui.li": "bc6ad3cac897835cd3f354827499f6d8",
  "xianhua.hu": "6354f0d6fc183366860645130b98de2d",
  "xun.liu": "cd30f92fc8858e70d79a30dd796b1c6e",
  "peng.lei": "ad8780f0ea056a7401cb03f0d3f0f8a3"
}

module.exports = {
  formatTime: formatTime,
  user: user,
  unikey: unikey
}
